package com.ali.service;

import com.ali.common.Response;

import java.util.Map;
import java.util.concurrent.CompletableFuture;

public interface Resilience4jService {
    /**
     * 服务熔断
     */
    Response<String> circuitBreaker(Map<String, Object> param);

    /**
     * 服务隔离，信号量模式
     */
    Response<String> bulkheadSemaphore(Map<String, Object> param);

    /**
     * 服务隔离，线程池模式
     */
    CompletableFuture<String> bulkheadThreadPool(Map<String, Object> param);

    /**
     * 服务限流
     */
    Response<String> rateLimiter(Map<String, Object> param);
}
